package com.hbusa.cotroller.image;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;

/**
 * @author XiaoXin
 * @date 2021/12/27 - 17:17
 */

@WebServlet("/admin/doInfo")
public class InfoServlet extends HttpServlet {
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String picture_id = req.getParameter("picture_id");
        if (picture_id != null) {
            HttpSession session = req.getSession();
            session.setAttribute("picture_id", picture_id);
            System.out.println("picture_id：" + picture_id);
        }
        req.getRequestDispatcher("/admin/pictureAdd.jsp").forward(req, resp);
    }
}
